com.highdeal.pnr.hci
Class TranslationRowModel

java.lang.Object
  extended by com.highdeal.pnr.hci.TranslationRowModel
All Implemented Interfaces:
XMLMarshallable

public class TranslationRowModel
extends java.lang.Object
implements XMLMarshallable

This class represents a row in a translation table. If i0, i1, i2, i3 or i4 is not set, that mean for "any" in-value.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="row">
   <xs:complexType>
     <xs:attribute name="i0" type="xs:string" use="optional"/>
     <xs:attribute name="i1" type="xs:string" use="optional"/>
     <xs:attribute name="i2" type="xs:string" use="optional"/>
     <xs:attribute name="i3" type="xs:string" use="optional"/>
     <xs:attribute name="i4" type="xs:string" use="optional"/>
     <xs:attribute name="sd" type="xs:dateTime" use="optional" />
     <xs:attribute name="ed" type="xs:dateTime" use="optional" />
     <xs:attribute name="s0" type="xs:string" use="optional"/>
     <xs:attribute name="n0" type="xs:decimal" use="optional"/>
     <xs:attribute name="s1" type="xs:string" use="optional"/>
     <xs:attribute name="n1" type="xs:decimal" use="optional"/>
     <xs:attribute name="s2" type="xs:string" use="optional"/>
     <xs:attribute name="n2" type="xs:decimal" use="optional"/>
     <xs:attribute name="s3" type="xs:string" use="optional"/>
     <xs:attribute name="n3" type="xs:decimal" use="optional"/>
     <xs:attribute name="s4" type="xs:string" use="optional"/>
     <xs:attribute name="n4" type="xs:decimal" use="optional"/>
     <xs:attribute name="s5" type="xs:string" use="optional"/>
     <xs:attribute name="n5" type="xs:decimal" use="optional"/>
     <xs:attribute name="s6" type="xs:string" use="optional"/>
     <xs:attribute name="n6" type="xs:decimal" use="optional"/>
     <xs:attribute name="s7" type="xs:string" use="optional"/>
     <xs:attribute name="n7" type="xs:decimal" use="optional"/>
     <xs:attribute name="s8" type="xs:string" use="optional"/>
     <xs:attribute name="n8" type="xs:decimal" use="optional"/>
     <xs:attribute name="s9" type="xs:string" use="optional"/>
     <xs:attribute name="n9" type="xs:decimal" use="optional"/>
     <xs:attribute name="s10" type="xs:string" use="optional"/>
     <xs:attribute name="n10" type="xs:decimal" use="optional"/>
     <xs:attribute name="s11" type="xs:string" use="optional"/>
     <xs:attribute name="n11" type="xs:decimal" use="optional"/>
     <xs:attribute name="s12" type="xs:string" use="optional"/>
     <xs:attribute name="n12" type="xs:decimal" use="optional"/>
     <xs:attribute name="s13" type="xs:string" use="optional"/>
     <xs:attribute name="n13" type="xs:decimal" use="optional"/>
     <xs:attribute name="s14" type="xs:string" use="optional"/>
     <xs:attribute name="n14" type="xs:decimal" use="optional"/>
   </xs:complexType>
 </xs:element>


Constructor Summary
TranslationRowModel()
          Builds an empty TranslationRowModel.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.util.Date getEndDate()
          Returns the end date for this row.
 boolean getIfDatesAreUsed()
           
 java.lang.String getInValue(int inIndex)
          Returns the input value from an index.
 java.lang.Object getOutValue(int outIndex)
          Returns the output value from an index.
 java.util.Date getStartDate()
          Returns the start date for this row.
 boolean isValid(java.util.Vector<OutAttributeModel> outAttributes)
          Returns true if the translation row is valid.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setEndDate(java.util.Date d)
          Sets the end date for this row.
 void setInValue(int inIndex, java.lang.String value)
          Sets the input value at an index.
 void setOutValue(int outIndex, java.lang.Object value)
          Sets the output value at an index.
 void setStartDate(java.util.Date d)
          Sets the start date for this row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslationRowModel

public TranslationRowModel()
Builds an empty TranslationRowModel.

Method Detail

getInValue

public java.lang.String getInValue(int inIndex)
Returns the input value from an index.

Parameters:
inIndex - the index.
Returns:
the input value at the index.

setInValue

public void setInValue(int inIndex,
                       java.lang.String value)
Sets the input value at an index.

Parameters:
inIndex - the index.
value - the input value.

getStartDate

public java.util.Date getStartDate()
Returns the start date for this row.

Returns:
The start date for this row.

setStartDate

public void setStartDate(java.util.Date d)
Sets the start date for this row.

Parameters:
d - The start date for this row.

getEndDate

public java.util.Date getEndDate()
Returns the end date for this row.

Returns:
The end date for this row.

setEndDate

public void setEndDate(java.util.Date d)
Sets the end date for this row.

Parameters:
d - The end date for this row.

getOutValue

public java.lang.Object getOutValue(int outIndex)
Returns the output value from an index.

Parameters:
outIndex - the index.
Returns:
the output value at the index.

setOutValue

public void setOutValue(int outIndex,
                        java.lang.Object value)
Sets the output value at an index.

Parameters:
outIndex - the index.
value - the output value.

isValid

public boolean isValid(java.util.Vector<OutAttributeModel> outAttributes)
Returns true if the translation row is valid.

Parameters:
outAttributes - a Vector of OutAttributeModel representing out attribute format.
Returns:
true if the translation row is valid, false otherwise.

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

getIfDatesAreUsed

public boolean getIfDatesAreUsed()

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)